<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body>

  <%@ include  file="/WEB-INF/include/header.jsp"%>
  
  <%@ include file="/WEB-INF/include/menu.jsp"%>
  
  <div class="container main-content">
  
    <div class="panel panel-default x-panel x-panel-layout">
    
      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/user">线下代言人管理</a></li>
          <li class="active">线下代言人列表</li>
        </ol>
      </div>
    
      <div class="panel-body">
      
        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>
      
        <div class="col-xs-10 x-panel-layout-right">
          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>线下代言人管理&nbsp;-&nbsp;线下代言人列表</span></h2>
            </div>
          </div>
          
          <table class="table table-striped table-hover x-table bottom-margin-20">
            <thead>
              <tr>
                <th>购买人</th>
                <th>推荐人</th>
                <th>优惠码</th>
                <th>订单价格</th>
                <th>课程</th>
                <th>购买时间</th>
              </tr>
            </thead>
            <tbody>
              <c:forEach var="agent" items="${offlineAgents}">
                <tr>
                  <td>${agent.purchaser}</td>
                  <td>${agent.saler}</td>
                  <td>${agent.code}</td>
                  <td><fmt:formatNumber value="${agent.price/100}" maxFractionDigits="2" pattern="0.00"/></td>
                  <td>${agent.courseRound.course.name}</td>
                  <td><fmt:formatDate value="${agent.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                </tr>
              </c:forEach>
            </tbody>
          </table>
          
          <div class="form-horizontal clearfix">
            
            <jsp:include page="/WEB-INF/include/page.jsp">
              <jsp:param name="url" value="offline-agents" />
              <jsp:param name="queryString" value="${queryString}" />
            </jsp:include>
            
          </div>
          
        </div>
      </div>
    </div>
  </div>
  
</body>
</html>